74f4d8590de85eaa92c711010bbc0ff0e33ee2e8,hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/impl/MetricsSourceAdapter.java,MetricsSourceAdapter,updateJmxCache,#,155

Before Change


    }

    synchronized(this) {
      int oldCacheSize = attrCache.size();
      int newCacheSize = updateAttrCache();
      if (oldCacheSize < newCacheSize) {
        updateInfoCache();
      }
      jmxCacheTS = Time.now();

After Change


    }

    synchronized(this) {
      updateAttrCache();
      if (getAllMetrics) {
        updateInfoCache();
      }